<template>
  <el-dialog
    title="编辑"
    :visible.sync="dialogVisible"
    width="30%"
  >
    <div style="width: 100%;background: #F2F2F2;padding: 10px;height: 50px;margin-bottom:10px;line-height: 30px">
      已有URL：{{item.url}}
    </div>
    <span><div>输入新URL:</div><textarea v-model="url" type="text" style="width: 100%;height: 30px;margin-top:10px;resize: none"></textarea></span>
    <span slot="footer" class="dialog-footer">
      <el-button @click="dialogVisible = false">取 消</el-button>
      <el-button type="primary" @click="send">上 传</el-button>
    </span>
  </el-dialog>
</template>

<script>
  /*eslint-disable*/
import {getOperatingEdit} from "../../utils/productcheck";

  export default {
    name: "Pass",
    data() {
      return {
        dialogVisible: false,
        item:{},
        url:""
      }
    },
    methods: {
      showdialog(item) {
        this.item=item;
        this.dialogVisible=true;
      },
      send(){
        getOperatingEdit('/operatingEdit',{
          "porcelainCode":this.item.porcelainCode,
          "url":this.url
        });
        this.item.url=this.url
        this.dialogVisible=false;
      }
    },
  }
</script>

<style scoped>
  .dialog-footer{
    display: flex;align-items: center;justify-content: center;
  }
</style>
